1. Field of the Invention
A certain aspect of the present invention relates to an electronic device, an information processing method, and a storage medium.
2. Description of the Related Art
Log analysis is a typical method for analyzing (i.e., debugging) an error in a program running on, for example, an embedded device. Normally, instructions (e.g., printf function in C language) are embedded in various places in the source code of a program to output, for example, the values of variables used in the program and information indicating the status of hardware executing the program to a log file. When an error (or failure) occurs, the cause of the error is estimated or identified by analyzing the log file output by the instructions (hereafter called “log output instructions”).
However, information in a log file (initial log file) output by log output instructions embedded beforehand in source code is sometimes not enough to perform detailed analysis. In such a case, an approximate location of an error is determined based on the initial log file. Then, the source code of the program is modified so that a more detailed log is output for a portion of the program around the determined location, and the modified source code is compiled and linked to update the program. If the cause of the error cannot be identified even with a log file output from the updated program, further log output instructions are added to the source code and the above steps are repeated. Thus, error analysis based on a log sometimes requires a cumbersome process.
To reduce the workload of analyzing an error, a technology using a diagnostic program has been developed. The diagnostic program can interrupt a process of a running program (target program) to dynamically insert its own process at a desired point (diagnosis point) in the target program and can obtain the values of variables used in the target program (see, for example, Japanese Patent Application Publication No. 2008-269163). After the process of the diagnostic program is completed, the process of the target program is resumed from the interrupted point. This technology makes it possible to output a log of a target program using a diagnostic program without modifying the source code of the target program. Also, this technology enables a user to send a diagnostic program (additional program) via a network to a device running a target program and to remotely control the diagnostic program via the network. Such a remote control feature of a diagnostic program may further increase the convenience for the user (e.g., an administrator, a person in charge of error analysis, etc.).
However, for an end user of a device, the above technology indicates a possibility that a diagnostic program is installed in the device and a log is obtained by the diagnostic program without the knowledge of the end user. In other words, for an end user of a device, the above technology may cause security problems such as leakage of confidential information stored in the device.